<!-- eslint-disable no-undef -->
<!-- eslint-disable prettier/prettier -->
<script setup>
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import { onMounted, onUnmounted } from "vue";
const fontsize = () => {
  const html = document.getElementsByTagName("html")[0];
  const oWidth =
    document.body.clientWidth || document.documentElement.clientWidth;
  html.style.fontSize = (oWidth / 1000) * 10 + "px";
};
let timer;
onMounted(() => {
  fontsize();
  timer = setInterval(() => {
    setTimeout(fontsize, 0);
  }, 1000 * 3);
});
onUnmounted(() => {
  clearInterval(timer); // 组件卸载时清除定时器
});
</script>

<template>
  <div>
    <!-- App.vue只需要留一个路由出口 router-view即可 -->
    <!-- <el-config-provider :locale="zhCn"> -->
    <router-view></router-view>
    <!-- </el-config-provider> -->
  </div>
</template>

<style scoped></style>
